package editro.view 
{
	import editro.events.system.SystemEvent;
	import editro.model.ATECacheModel;
	import editro.view.components.DockBar;
	import org.robotlegs.mvcs.Mediator;
	
	/**
	 * ...
	 * @author LEEF LEE_LEAF918@163.COM_QQ969442267
	 */
	public class DockBarMediator extends Mediator 
	{
		[Inject] 
		public var view:DockBar;
		[Inject] 
		public var cacheMOdel:ATECacheModel;
		
		override public function onRegister():void 
		{
			super.onRegister();
			view.init(cacheMOdel.stageInstance.stageWidth, cacheMOdel.stageInstance.stageHeight);
			view.buttonSignal.add(viewSignalHandler);
		}
		
		private function viewSignalHandler(t:String):void 
		{
			switch (t) 
			{
				case DockBar.TRACEBTN:
					dispatch(new SystemEvent(SystemEvent.TRACE_RELATIONSHIP_INFO));
				break;
				default:
					
				break;
			}
		}
	}
}